/*
 * @Date: 2025-01-02 17:13:18
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2025-01-08 16:15:08
 * @Description: 表单设计工具类
 */

/**
   * 是否为JSON字符串
   * 
   * @param {String} value 内容
   * @returns 
   */
export const isJSONString = (value) => {
  // 判断是否为JSON字符串
  try {
    JSON.parse(value)
    return true
  } catch (err) {
    console.log('非JOSN字符串')
    return false
  }
}

/**
 * 表单设计器的缓存数据
 */
export const clearFormDesignerCache = () => {
  window.localStorage.removeItem('widget__list__backup');
  window.localStorage.removeItem('form__config__backup');
}
